[#709] Enable disabled and invisible tests across the sibling modules#707
Merged
vharseko merged 3 commits intoJul 8, 2026
Merged
Conversation
An audit of the enabled=false test methods across the sibling modules found four disabled without any stated reason (the remaining ones all document why they are off). All four pass once enabled: - LDIFEntryWriterTestCase.testSetAddUserFriendlyComments and LDIFChangeRecordWriterTestCase.testSetAddUserFriendlyComments pass as-is; - GrizzlyLDAPListenerTestCase.testLDAPListenerLoadBalanceDuringHandleAccept passes as-is; - GrizzlyLDAPListenerTestCase.testLDAPListenerProxyDuringHandleAccept contained a copy-paste error: the client connected to the online server directly instead of to the proxy listener, so the proxy handleAccept was never invoked and the test timed out waiting for the proxied connection. Connect to the proxy listener instead.
- Rename TemplateTagTestcase to TemplateTagTestCase: the lowercase "c" never matched the *TestCase include pattern, so its 21 tests never ran (all pass). - PropertyDefinitionUsageBuilder.visitString threw a NullPointerException for string properties which define a pattern but no pattern synopsis, breaking error message generation for pattern validation failures - the "I18N problem" that kept two StringPropertyDefinitionTest methods disabled. Append the synopsis only when present and enable the tests. - ValidateConfigDefinitionsTest.validateConfigObjectDefinitions, DefaultTCPNIOTransportTestCase.testGetInstance and ConnectionFactoryTestCase.testSchemaUsage carry stale disable reasons (a TODO about unavailable object classes, an unclean-environment FIXME and OPENDJ-159): all pass now, twice in a row, together with their neighbouring classes. Still disabled with valid reasons: the entry generator debug printer, the GSSAPI bind test (needs a KDC), the rest2ldap case-insensitive field selection (CREST-86, confirmed still failing) and the Windows-only FileManagerTest case.
maximthomas
reviewed
Jul 6, 2026
| @@ -67,7 +68,7 @@ Object[][] enumerateManageObjectDefns() throws Exception { | |||
| "org.forgerock.opendj.config.std.meta.RootCfgDefn", "org.forgerock.opendj.config.std.meta.GlobalCfgDefn", }); | |||
|
|
|||
| /** TODO : does not work because can't retrieve object class objects */ | |||
Contributor
There was a problem hiding this comment.
Should this TODO be removed?
Member
Author
There was a problem hiding this comment.
Good catch — thanks. Removed, but the TODO turned out to point at a real problem, so I did more than delete it (e1c6fe8):
- The test only stayed green because its assertion was inverted (
errors.length() != 0), i.e. it passed precisely when a definition had problems. With the correct== 0it fails for all 37 definitions. - The cause is exactly what the TODO said: the
ds-cfg-*LDAP schema is not on theopendj-configtest class path, so object classes / attribute types resolve only as placeholders (verified:getObjectClass("ds-cfg-backend")→ 0 required / 0 optional attrs;getAttributeType("ds-cfg-java-class").isPlaceHolder() == true). That schema is generated inopendj-server-legacy.
So I reworked it into a naming-convention validator: fixed the assertion to == 0, dropped the schema-dependent checks (attribute-exists / single-vs-multi-valued / mandatory / allowed-attribute), and kept the checks verifiable from the definitions and their LDAP profiles alone. Fixing the assertion surfaced three real issues, now fixed:
CLASS_OBJECT_CLASS_EXCEPTIONSreferenced the obsoleteorg.forgerock.opendj.config.std.metapackage, soroot/globalwere no longer excluded → updated toorg.forgerock.opendj.server.config.meta.http-endpoint'sauthorization-mechanismintentionally maps tods-cfg-http-authorization-mechanism→ added anLDAP_ATTRIBUTE_NAME_EXCEPTIONSlist for such deliberate deviations.
37/37 green now, and a negative-control run (removing the http exception) confirms the check still fails on a real deviation.
maximthomas
approved these changes
Jul 6, 2026
…lidator The test was re-enabled in OpenIdentityPlatform#707 but only stayed green because its assertion was inverted (errors.length() != 0), so it passed precisely when a definition had problems. Its schema-consistency checks also cannot run in opendj-config, where the ds-cfg-* LDAP schema is not on the test class path (object classes/attributes resolve as placeholders) - the reason behind the original "TODO: can't retrieve object class objects". Fix the assertion to == 0, drop the schema-dependent checks, and keep the naming-convention checks verifiable from the definitions and their LDAP profiles alone. Fixing the assertion surfaced three real issues, now fixed: - CLASS_OBJECT_CLASS_EXCEPTIONS referenced the obsolete org.forgerock.opendj.config.std.meta package; updated to org.forgerock.opendj.server.config.meta (root/global). - http-endpoint's authorization-mechanism intentionally maps to ds-cfg-http-authorization-mechanism; added LDAP_ATTRIBUTE_NAME_EXCEPTIONS.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
Follow-up to the
slowgroup audit (#684-#706): an inventory of tests that never run in the sibling modules — bothenabled = falsemethods and test classes whose file names do not match the surefire include patterns.Commit 1: four tests disabled without any stated reason
LDIFEntryWriterTestCase.testSetAddUserFriendlyComments,LDIFChangeRecordWriterTestCase.testSetAddUserFriendlyComments(opendj-core) — pass as-is (both classes 84/84 green).GrizzlyLDAPListenerTestCase.testLDAPListenerLoadBalanceDuringHandleAccept— passes as-is.GrizzlyLDAPListenerTestCase.testLDAPListenerProxyDuringHandleAccept— contained a copy-paste error: the client connected to the online server directly instead of to the proxy listener, so the proxyhandleAcceptwas never invoked and the test timed out. It now connects to the proxy listener.Commit 2: rotted disable reasons and a product NPE
TemplateTagTestcase→TemplateTagTestCase: the lowercase "c" never matched the*TestCaseinclude pattern, so its 21 tests have never run (all pass).PropertyDefinitionUsageBuilder.visitString()threw aNullPointerExceptionfor string properties which define a pattern but no pattern synopsis, breaking error message generation for pattern validation failures — the "I18N problem" that kept twoStringPropertyDefinitionTestmethods disabled since forever. The synopsis is now appended only when present; both tests enabled.ValidateConfigDefinitionsTest.validateConfigObjectDefinitions("TODO: can't retrieve object class objects") — 37/37;DefaultTCPNIOTransportTestCase.testGetInstance(unclean-environment FIXME) andConnectionFactoryTestCase.testSchemaUsage(OPENDJ-159) — grizzly module 2×88/88.Still disabled, with valid reasons
EntryGeneratorTestCase.printEntriesToStdOut— debug printer, not a test;GSSAPISASLBindRequestTestCase.testBindClient— requires a Kerberos KDC;BasicRequestsTest.testReadSelectPartialInsensitive— CREST-86, confirmed still failing (case-insensitive JSON field selection returns null);FileManagerTestcase.Verification
opendj-core84/84 +TemplateTagTestCase21/21;opendj-config2×42/42;opendj-grizzly2×88/88 (plus two earlier 10/10 listener runs).